// author:kong weicheng
// content：征询他人
<template>
  <div id="consult">
    <Header :title="title" :switchHeader='switchHeader'></Header>
    <!-- 审批人 -->
    <div class="approver">
      <span class="personTitle">审批人</span>
      <img class="avatar" src="../../../assets/imgs/icon_people.png" @click="add" />
      <img class="delete" src="../../../assets/imgs/3B.png" alt="" @click="clean"/>
      <span class="name">平安小王</span>
    </div>
    <!-- 意见详情 -->
    <div class="opinionDetails">
      <span class="opinion">意见详情</span>
      <textarea cols="30" rows="10" placeholder="请输入：" maxlength="300" @input="valueInput" v-model="value"></textarea>
      <span class="fontCount">{{txtVal}}/300</span>
      <span class="record" @click="check">征询记录</span>
    </div>
    <BottomBtn :text="text"></BottomBtn>
  </div>
</template>

<script>
import Header from '../../../components/Header'
import BottomBtn from '../../../components/BottomBtn'
export default {
  data () {
    return {
      title: '征询他人',
      text: '确定',
      txtVal: 0,
      switchHeader: true,
      value: ''
    }
  },
  methods: {
    valueInput: function () {
      this.txtVal = this.value.length
    },
    add: function () {
      this.$router.push('/descript')
    },
    clean: function () {
      this.$router.push('/descript')
    },
    check: function () {
      this.$router.push('/descript')
    }
  },
  components: {
    Header,
    BottomBtn
  }
}
</script>

<style scoped>
#consult {
  width: 375px;
  height: 812px;
  background: rgba(244, 244, 244, 1);
}
.approver,
.opinionDetails {
  width: 355px;
  margin: auto;
  margin-top: 10px;
  background: rgba(255, 255, 255, 1);
  border-radius: 8px;
  position: relative;
}
.approver {
  height: 88px;
  box-shadow: 0px 2px 6px 0px rgba(204, 204, 204, 1);
  display: flex;
}
.personTitle {
  width: 45px;
  position: absolute;
  top: 16px;
  left: 10px;
}
.avatar {
  width: 44px;
  height: 44px;
  position: absolute;
  top: 12px;
  left: 87px;
}
.delete{
  width: 17px;
  height: 17px;
  position: absolute;
  top: 7px;
  left: 125px;
}
.name {
  width: 48px;
  height: 17px;
  font-size: 12px;
  color: rgba(102, 102, 102, 1);
  line-height: 17px;
  text-shadow: 0px 2px 6px rgba(204, 204, 204, 1);
  position: absolute;
  bottom: 9px;
  left: 85px;
}
.opinionDetails {
  height: 204px;
}
.opinion {
  width: 135px;
  display: block;
  position: absolute;
  top: 18px;
  left: 10px;
}
img {
  display: block;
}
textarea {
  width: 325px;
  height: 100px;
  border: 0;
  font-size: 16px;
  margin: auto;
  padding: 0;
  background: rgba(244, 244, 244, 1);
  display: block;
  position: absolute;
  top: 59px;
  left: 15px;
}
::-webkit-input-placeholder{
  position: relative;
  top: 13px;
  left: 10px
}
span {
  height: 21px;
  font-size: 15px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: rgba(67, 48, 54, 1);
  line-height: 21px;
  display: block;
}

.fontCount {
  width: 47px;
  height: 22px;
  font-size: 16px;
  color: rgba(153, 153, 153, 1);
  line-height: 22px;
  position: absolute;
  bottom: 56px;
  right: 25px
}
.record{
  width:56px;
  height:20px;
  font-size:14px;
  color:rgba(211,176,91,1);
  line-height:20px;
  position: absolute;
  bottom: 15px;
  right: 15px
}
</style>
